<?php

namespace ctrl;

use model\siteconfig;
use libs\view;

class system extends base
{
	const THEMEDIR = P_ROOT."/app/index/view/default/index/";//内容列表模板路径
	private static $M;
	public static function Init()
	{
		parent::init();
		self::$M = new siteconfig;
	}

	public static function index()
	{
		view::assign('config', self::$M->FindData());
		view::assign('templist',GetFileFolderList(self::THEMEDIR,0,"*.html"));
		view::display();
	}

	public static function edit()
	{
		$result = self::$M->updateData();
		Response(array('status' => $result['status'], 'info' => $result['msg']));
	}
}
